package models;

import javax.persistence.Entity;

import play.db.jpa.Model;

@Entity
public class SensorType extends Model{

    public enum Type{
        AMBIENT,
        BAROMETER,
        COLOR,
        DISTANCE_IR,
        DISTANCE_US,
        GPS,
        HALL_EFFECT,
        HUMIDITY,
        LINE,
        MOISTURE,
        MOTION_DETECTOR,
        PTC,
        SOUND_INTENSITY,
        TEMPERATURE,
        TEMPERATURE_IR,
        TILT;
    }
    
    private String unit;
    private Type type;

    protected SensorType() {

    }

    public SensorType(Type type, String unit){
        this.type = type;
        this.unit = unit;
    }
    
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String toString() {
        return "Type="+type+" unit="+unit;
    }
    
    
}
